﻿///***************************************************************
/// 시  스  템 : Updms.Etc.Exe
/// 단위시스템 : FIT
/// 계      층 : Execute Layer (Relation Transaction)
/// 프로그램명 : Fit1011m_RT
/// 파  일  명 : Fit1011m_RT.cs
/// 설      명 : 운동수행관리
///***************************************************************
/// 수정ID 일자       이름     내용
///---------------------------------------------------------------
/// CH001  2014-05-21 송시명   최초 작성
///***************************************************************
using System.EnterpriseServices;
using System.Runtime.InteropServices;

using SMFramework.Data;


namespace Updms.Fit.Exe
{
	[ComVisible(true)]
	[Transaction(TransactionOption.Required)]
	[JustInTimeActivation(true)]
	public class Fit1011m_RT : Base.AppFramework.RuleBase
	{
		public Fit1011m_RT()
		{
		}

		#region InsertProcess
		/// <summary>
		/// 근력운동을 저장한다.
		/// </summary>
		/// <param name="lo_dp"></param>
		/// <returns></returns>
		[AutoComplete]
		public int InsertProcess(DataPack lo_dp)
		{
			_exeTimeLog.Prepare();

			using (Dac.Fit_Dac_UPDMS_FIT_WEIGHT_TRAINING _dac = new Dac.Fit_Dac_UPDMS_FIT_WEIGHT_TRAINING())
			{
				return _dac.Insert(lo_dp);
			}
		}

		#endregion

		#region UpdateProcess
		/// <summary>
		/// 근력운동을 수정한다.
		/// </summary>
		/// <param name="lo_dp"></param>
		/// <returns></returns>
		[AutoComplete]
		public int UpdateProcess(DataPack lo_dp)
		{
			_exeTimeLog.Prepare();

			using (Dac.Fit_Dac_UPDMS_FIT_WEIGHT_TRAINING _dac = new Dac.Fit_Dac_UPDMS_FIT_WEIGHT_TRAINING())
			{
				return _dac.Update(lo_dp);
			}
		}

		#endregion

		#region DeleteProcess
		/// <summary>
		/// 근력운동을 삭제한다.
		/// </summary>
		/// <param name="ls_xml"></param>
		/// <returns></returns>
		[AutoComplete]
		public int DeleteProcess(string ls_xml)
		{
			_exeTimeLog.Prepare();

			using (Dac.Fit_Dac_UPDMS_FIT_WEIGHT_TRAINING _dac = new Dac.Fit_Dac_UPDMS_FIT_WEIGHT_TRAINING())
			{
				return _dac.Delete(ls_xml);
			}
		}

		#endregion

		#region InsertPartsProcess
		/// <summary>
		/// 종류별 근력운동을 저장한다.
		/// </summary>
		/// <param name="ls_xml"></param>
		/// <returns></returns>
		[AutoComplete]
		public int InsertPartsProcess(string ls_training_id, string ls_xml)
		{
			_exeTimeLog.Prepare();

			using (Dac.Fit_Dac_UPDMS_FIT_WEIGHT_TRAINING_PARTS _dac = new Dac.Fit_Dac_UPDMS_FIT_WEIGHT_TRAINING_PARTS())
			{
				return _dac.Insert(ls_training_id, ls_xml);
			}
		}

		#endregion

	}
}
